#pragma once
#include "../GenericPlatformTLS.h"

namespace Alice
{
    class WindowsPlatformTLS : public GenericPlatformTLS
    {
    public:
        static FORCEINLINE uint32 GetCurrentThreadId(void)
        {
            return ::GetCurrentThreadId();
        }
        static FORCEINLINE uint32 AllocTlsSlot(void)
        {
            return TlsAlloc();
        }
        static FORCEINLINE void SetTlsValue(uint32 SlotIndex, void* Value)
        {
            TlsSetValue(SlotIndex, Value);
        }
        static FORCEINLINE void* GetTlsValue(uint32 SlotIndex)
        {
            return TlsGetValue(SlotIndex);
        }
        static FORCEINLINE void FreeTlsSlot(uint32 SlotIndex)
        {
            TlsFree(SlotIndex);
        }
    };
    typedef WindowsPlatformTLS PlatformTLS;
} // namespace Alice
